package JavaEE初阶;

import java.util.Scanner;

public class Text{
    private static int isQuit;
    public static void main(String[] args){
        Thread t1  = new Thread(() ->{
            while(isQuit == 0){
                try {
                    Thread.sleep(10);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            System.out.println("t1线程结束");
        });
        t1.start();

        Thread t2 = new Thread(() ->{
            Scanner sc = new Scanner(System.in);
            System.out.println("请输入isQuit的值");
            isQuit = sc.nextInt();
        });
        t2.start();
    }

}